<template>
  <div class="advance-table-body">
    <!--搜索栏-->
    <el-form class="search-form--inset" ref="elForm" :model="queryParams" inline size="small" label-width="100px" label-position="left">

    </el-form>
    <!--操作栏-->
    <div class="table-operator">
      <!--<el-button type="primary" size="small" plain @click="clickBtnAdd">添加一条</el-button>-->
    </div>
    <!--表格-->
    <el-table
      class="k-table"
      ref="table"
      @selection-change="handleSelectionChange"
      :data="tableList"
      v-loading="loading"
    >
      <el-table-column label="序号" type="index" :formatter="fIndex" align="center" fixed width="50" />
      <el-table-column label="功能代码" align="left" prop="functionCode" min-width="100px" show-overflow-tooltip />
      <el-table-column label="功能名" align="left" prop="functionName" min-width="100px" show-overflow-tooltip />
      <el-table-column label="点数" align="left" prop="point" min-width="100px" show-overflow-tooltip />
      <el-table-column label="备注" align="left" prop="remark" min-width="100px" show-overflow-tooltip />
      <el-table-column label="更新时间" align="left" prop="updateTime" min-width="100px" show-overflow-tooltip />
      <el-table-column label="操作" align="left" width="150" fixed="right">
        <template #default="{ row }">
          <el-button type="text" @click="clickBtnEdit(row)">编辑</el-button>
        </template>
      </el-table-column>
    </el-table>
    <trust-pagination
      :total="total"
      :page-size.sync="queryParams.pageSize"
      :current-page.sync="queryParams.pageNum"
      @size-change="handleSizeChange" @current-change="handleCurrentChange"></trust-pagination>
    <function-point-config-dialog ref="functionPointConfigDialogRef"></function-point-config-dialog>
  </div>
</template>
<script>
import { saTableMixin } from '@/views/custom/mixin/saTableMixin';
import FunctionPointConfigDialog from '@/views/custom/pointOperation/functionPointConfig/functionPointConfigDialog.vue';
export default {
  name: "FunctionPointConfig",//功能点数配置
  components: { FunctionPointConfigDialog },
  mixins: [saTableMixin],
  data() {
    return {
      rules: [],
      options: [],
    }
  },
  mounted() {
    this.requestData("/fun_point/list","get",this.queryParams);
  },
  methods:{
    clickBtnEdit(row){
      this.$refs.functionPointConfigDialogRef.openDiaolog(1,row.id,()=>{
        this.refreshTableData();
      });
    },
  }
}
</script>

<style scoped>
.titleLabel{
  font-size: 16px;
  font-weight: 500;
  color: #333333;
}
.contentLabel{
  font-size: 14px;
  color: #666666;
}
.tagLabel{
  font-size: 14px;
  color: #999999;
}
.flex{
  display: flex;
}
</style>
